﻿using AllServer.GrpcClient.Proxy;
using Newtonsoft.Json;

namespace AllServer.Account.Application
{
    /// <summary>
    /// 系统服务接口
    /// </summary>
    public class SystemAppService : IDynamicApiController
    {
        private readonly ISystemService _systemService;
        private readonly IProxyGrpcClient _proxyGrpcClient;
        public SystemAppService(ISystemService systemService, IProxyGrpcClient proxyGrpcClient)
        {
            _systemService = systemService;
            _proxyGrpcClient = proxyGrpcClient;
        }

        /// <summary>
        /// 获取系统描述
        /// </summary>
        /// <returns></returns>
        public async Task<string> GetDescription()
        {
            var isBool = await _proxyGrpcClient.IsProxy(2);
            var result = await _proxyGrpcClient.GetProxy(2);
            return "是否：" + isBool + " Member:" + JsonConvert.SerializeObject(result);
        }
    }
}
